package com.example.demo.config;

import org.springframework.amqp.core.DirectExchange;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 交换机配置类
 */
@Configuration
public class ExchangeConfig {


    @Bean
    public DirectExchange directExchange(){
        DirectExchange exchange=new DirectExchange(RabbitMqConfig.EXCHANGE,true,false);
        return exchange;
    }
}
